package com.mall.bargain.service;

import com.github.pagehelper.PageInfo;
import com.mall.bargain.vo.VoBargain;
import com.mall.bargain.vo.VoTbImage;
import com.mall.common.response.CommonResponse;
import com.mall.entity.TbBargain;
import com.mall.entity.TbItmeSpec;
import com.mall.entity.bargain.BgBargain;

import java.util.List;

/**
 * @author: W
 * @date: 2021/07/20/17:30
 * Other:
 */
public interface IBargainService {

    /**
     * 查找图片
     * @param id
     * @return VoTbImage
     */
    VoTbImage findImage(Long id);

    /**
     * 添加砍价商品表
     * @param bargain
     */
    void addBargain(VoBargain bargain);

    /**
     * 查询砍价商品表
     * @param bargain
     * @param page
     * @param size
     * @return PageInfo
     */
    PageInfo findBargainAll(VoBargain bargain, int page, int size);

    /**
     * 修改砍价商品表
     * @param bargain
     */
    void updateBargainById(TbBargain bargain);

    /**
     * 回显砍价商品表
     * @param id
     * @return List<VoBargain>
     */
    TbBargain findBargainOne(Long id);

    /**
     * 逻辑删除商品表
     * @param id
     */
    void delBargainOne(Integer id);

    /**
     * 逻辑删除商品表
     * @param goodsId
     * @return List<TbItmeSpec>
     */
    List<TbItmeSpec> findItemSpecAll(Long goodsId);

    /**
     * 查询砍价活动列表
     *
     * @return {@link List<BgBargain>}
     */
    List<BgBargain> findList();

    CommonResponse startBargain(Integer uid, Long id);

    CommonResponse cutAKnife(Integer uid, Integer userBargainId);


    CommonResponse updateStatusById(Long id, String status);
}
